home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 4.1 KB | 136 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWLnkDst.h
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWLNKDST_H
- #define FWLNKDST_H
-
- #ifndef FWLINK_H
- #include "FWLink.h"
- #endif
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- #ifndef FWRUNTYP_H
- #include "FWRunTyp.h"
- #endif
-
- #ifndef FWTCOLL_H
- #include "FWTColl.h"
- #endif
-
- #ifndef FWODTYPS_H
- #include "FWODTyps.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class ODStorageUnit;
- class ODLink;
- class FW_CPresentation;
- class FW_CPart;
- class FW_CCloneInfo;
- class FW_CDataInterchange;
-
- //========================================================================================
- // class FW_CLinkDestination
- //========================================================================================
-
- class FW_CLinkDestination : public FW_CLink
- {
- public:
- FW_CLinkDestination(Environment* ev,
- ODLink* odLink,
- ODLinkInfo* linkInfo,
- FW_CPresentation* presentation);
- virtual ~FW_CLinkDestination();
-
- virtual FW_Boolean DoUpdateLink(Environment* ev, ODStorageUnit* linkContentSU, ODPasteAsResult* embedInfo) = 0;
- virtual void DoPropagateChanges(Environment* ev, ODUpdateID updateID);
-
- virtual void LinkEstablished(Environment* ev);
- virtual void LinkUpdated(Environment* ev, ODUpdateID updateID);
-
- virtual void BreakLink(Environment* ev);
- virtual void RestoreLink(Environment* ev, FW_CPart* part);
-
- virtual void DoExternalizeLink(Environment* ev, ODStorageUnit* storageUnit,
- FW_CCloneInfo* cloneInfo) = 0;
-
- void ExternalizeLink(Environment* ev, ODStorageUnit* storageUnit,
- FW_CCloneInfo* cloneInfo);
-
- ODLink* GetODLink(Environment* ev) const;
- FW_Boolean IsAutoUpdate(Environment* ev) const;
-
- FW_Boolean IsRegistered(Environment* ev) const;
- void Register(Environment* ev, FW_CPart* itsPart);
- void Unregister(Environment* ev);
-
- ODUpdateID GetUpdateID(Environment* ev) const;
- void PrivEstablishLink(Environment* ev);
- void SavePasteAsSettings(Environment* ev, ODPasteAsResult& pasteAsResult);
-
- protected:
- ODLink* fODLink;
- ODLinkInfo fLinkInfo;
- FW_CDataInterchange* fDataInterchange;
-
- private:
- FW_Boolean fRegistered;
- FW_CPart* fPart;
- FW_Boolean fEstablished;
-
- //-- Additional settings from the Paste As dialog
- FW_Boolean fEmbed; // FALSE means Merge with Contents
- ODPasteAsResult fEmbedInfo; // valid if fEmbed is true
- };
-
- //========================================================================================
- // Inlines
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // FW_CLinkDestination::GetODLink
- //----------------------------------------------------------------------------------------
- inline ODLink* FW_CLinkDestination::GetODLink(Environment*) const
- {
- return fODLink;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CLinkDestination::IsAutoUpdate
- //--------------------------------------------------------------------
- inline FW_Boolean FW_CLinkDestination::IsAutoUpdate(Environment*) const
- {
- return fLinkInfo.autoUpdate;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CLinkDestination::IsRegistered
- //--------------------------------------------------------------------
- inline FW_Boolean FW_CLinkDestination::IsRegistered(Environment*) const
- {
- return fRegistered;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CLinkDestination::GetUpdateID
- //--------------------------------------------------------------------
- inline ODUpdateID FW_CLinkDestination::GetUpdateID(Environment*) const
- {
- return fLinkInfo.change;
- }
-
-
- #endif
-